<!--{template ADMIN_DIRECTORY/tpl/admin_header}-->
<style type="text/css">
	table tr .t_r{text-align:right}
</style>
<div class="page_title">
  <h1>{$model_info[model_name]}{$_lang['task_config']}</h1>
    <div class="tool">
      <a href="index.php?do={$do}&model_id={$model_id}&view={$view}&op=config">{$_lang['basic_config']}</a>
      <a href="index.php?do={$do}&model_id={$model_id}&view={$view}&op=control" class="here">{$_lang['control_config']}</a>
      <a href="index.php?do={$do}&model_id={$model_id}&view={$view}&op=priv">{$_lang['private_config']}</a>
    </div>
</div>
<div class="box post">
<div class="tabcon">
 <div class="title"><h2>{$_lang['control_config']}</h2></div>
  <form name="frm_config_reward" action="{$ac_url}" method="post" id="frm_config_reward">
  <input type="hidden" name="pk[model_id]" value="{$model_id}">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">

	<tr>
		 <th scope="row" width="200"> <b>{$_lang['task_commission_strategy']}</b>{$_lang['zh_mh']}任务规则设置和异常任务资金分配
</th><td>&nbsp;</td>
	</tr>

	
	<tr>
		<th scope="row" width="200" class="t_r">稿件隐藏{$_lang['zh_mh']}</th> 
		<td>
			<label for="end_action_1"><input type="radio"  {if $work_hidden =='0'||!$work_hidden}checked="checked"{/if} name="conf[work_hidden]" id="work_hidden_1" value="0">{$_lang['close']}</label>
			<label for="end_action_2"><input type="radio" {if $work_hidden =='1' }checked="checked"{/if} name="conf[work_hidden]" id="work_hidden_2" value="1">{$_lang['open']}</label>
			<span>&nbsp&nbsp开启之后普通威客用户可以隐藏稿件(雇主增值服务时依然强制隐藏)</span>
		</td>
	</tr>
	
	<tr>
		<th scope="row" width="200" class="t_r">{$_lang['task_royalty_rate']}{$_lang['zh_mh']}</th>
		<td>
			<input type="text" size="10" name="conf[task_rate]" id="task_rate" value="{$task_rate}" limit="required:true;type:int;len:1-3;between:0-100" msg={$_lang['task_royalty_rate_notice']} title={$_lang['task_royalty_rate_title']} msgArea="task_rate_msg" class="txt"/>%（站长提取任务佣金的百分比，设为0即无抽佣）<span id="task_rate_msg"></span>
		</td>
	</tr>
	<tr>
		<th scope="row" width="200" class="t_r">任务诚意总金额{$_lang['zh_mh']}</th>
		<td>
			<input type="text" size="10" name="conf[deposit]" id="deposit" value="{$deposit}" limit="required:true;type:int;len:1-3;between:0-1000" msg="{$_lang['deposit_cash_between_0_1000']}" title="{$_lang['please_enter_deposit_cash']}" msgArea="task_deposit_msg" class="txt"/>{$_lang['yuan']}（任务流程中用户需缴纳的诚意金，设为0即无需诚意金）<span id="task_deposit_msg"></span>
		</td>
	</tr>

	<tr>
		<th scope="row" width="200" class="t_r">任务诚意金扣除
{$_lang['zh_mh']}</th>
		<td>
			<input type="text" size="10" name="conf[deposit_rate]" id="deposit_rate" value="{$deposit_rate}" limit="required:true;type:int;len:1-3;between:0-1000" msg="{$_lang['website_deposit_drawn_rate_0_100']}"  msgArea="task_deposit_rate_msg" class="txt"/>元（任务流程不同状况下扣除部分诚意金作为网站收入，设0即网站不抽佣）<span id="task_deposit_rate_msg"></span>
		</td>
	</tr>

	<!--
	<tr>
		<th scope="row" width="200" class="t_r">{$_lang['task_fail_returned_smoke_scale']}{$_lang['zh_mh']}</th>
		<td>
			<input type="text" size="10" name="conf[task_fail_rate]" id="task_fail_rate" value="{$task_fail_rate}" limit="required:true;type:int;len:1-3;between:0-100" msg={$_lang['task_royalty_rate_notice']} title={$_lang['task_royalty_rate_title']} msgArea="task_fail_rate_msg" class="txt"/>%（任务异常失败时站长佣金百分比，设为0即无抽佣）<span id="task_fail_rate_msg"></span>
		</td>
	</tr>-->
		<tr>
			<th scope="row" width="200">{$_lang['cash_cove_config']}{$_lang['zh_mh']}</th>
				<td><a class="button" href="index.php?do=model&model_id=$model_id&view=config&op=cash_rule&ac=add">
						<span class="pen icon"></span>{$_lang['add_new_cove']}
					</a>
				</td>
		</tr>
		<tr>
			<th scope="row" width="200" class="t_r">&nbsp;</th>
				<td>
				<ul>
					{loop $cash_cove $k $v}
								<li>
									{$v['cove_desc']}&nbsp;&nbsp;&nbsp;
										<a class="button" href="index.php?do=model&model_id=$model_id&view=config&op=cash_rule&ac=edit&rule_id={$k}">
											<span class="pen icon"></span>{$_lang['edit']}
										</a>&nbsp;&nbsp;
										<a class="button" href="index.php?do=model&model_id=$model_id&view=config&op=cash_rule&ac=del&rule_id={$k}">
											<span class="trash icon"></span>{$_lang['delete']}
										</a>
								</li>
							{/loop}
						</ul>
					</td>
		</tr>
  	<tr><th scope="row" width="200">{$_lang['task_time_rule_set']}{$_lang['zh_mh']}任务交易时间规则和用户参与时间限制
</th><td>&nbsp;</td></tr>

	<tr>
		<th scope="row" width="200" class="t_r">抢标最小时间限制{$_lang['zh_mh']}</th>
		 <td>
			<input type="text" size="10" id="min_day"  name="conf[min_day]"  value="{$min_day}" limit="type:int;required:true;between:1-" msg={$_lang['task_least_one_day']} title={$_lang['task_min_time_one_day']} msgArea="span_min_day" class="txt">{$_lang['days']}
			<span id="span_min_day"></span>
		 </td>
	</tr>
	<tr>
		<th scope="row" width="200" class="t_r">抢标最大时间限制{$_lang['zh_mh']}</th>
		 <td>
			<input type="text" size="10" id="max_day"  name="conf[max_day]"  value="{$max_day}" limit="type:int;required:true;between:2-" msg="{$_lang['task_max_day_min_2_day']}" title="{$_lang['task_custom_max_day_min_2_day']}" msgArea="span_max_day" class="txt">{$_lang['day']}
			<span id="span_max_day"></span>
		 </td>
	</tr>
	<tr>
		<th scope="row" width="200" class="t_r">托管赏金时间限制{$_lang['zh_mh']}</th>
		 <td>
			<input type="text" size="10" id="tuoguan_hour"  name="conf[tuoguan_hour]"  value="{$tuoguan_hour}" limit="type:int;required:true;between:1-" msg="雇主托管赏金时间限制最少为1个小时" title="雇主托管赏金时间限制最少为1个小时" msgArea="span_tuoguan_hour" class="txt">小时(需求确认后雇主操作正整数小时时间限制)
			<span id="span_tuoguan_hour"></span>
		 </td>
	</tr>
	<tr>
		<th scope="row" width="200" class="t_r">确认付款时间限制{$_lang['zh_mh']}</th>
		 <td>
			<input type="text" size="10" id="confirm_hour"  name="conf[confirm_hour]"  value="{$confirm_hour}" limit="type:int;required:true;between:1-" msg="雇主确认完工时间限制最少为1个小时" title="雇主确认完工时间限制最少为1个小时" msgArea="span_confirm_hour" class="txt">小时(工作完成确认后雇主操作正整数小时时间限制)
			<span id="span_confirm_hour"></span>
		 </td>
	</tr>
	<!--<tr>
		<th scope="row" width="200" class="t_r">{$_lang['task_cutdown']}{$_lang['zh_mh']}</th>
		 <td>
			<input type="text" size="10" name="conf[cutdown]" id="cutdown" value="{$cutdown}"  limit="type:int;between:0-60" msg="{$_lang['task_cutdown_0_60']}" title="{$_lang['task_cutdown_0_60']}"  msgArea="span_cutdown_time" class="txt">{$_lang['minute_0_can_bid']}<span id="span_cutdown_time"></span>
		</td>
	</tr>-->
	<tr>
		<th scope="row" width="200">&nbsp;</th>
		<td>
            <div class="clearfix padt10">
            	<input type="hidden" name="sbt_edit" value="1">
			 <button type="button" name="sbt_edit" class="positive primary  button" value="1" onclick="confirmSub()"><span class="check icon"></span>{$_lang['submit']}</button>
			</div>
		</td>
	</tr>
  </table>
  </form>
   </div>
 </div>
<script type="text/javascript">
$(function(){
	if($("#end_action_1").attr("checked")==true){
		$("#slt").hide();
	}
	if($("#end_action_2").attr("checked")==true){
		 $("#slt").show();
	 }
	$("#end_action_1").click(function(){
		$("#slt").hide();
	})
	$("#end_action_2").click(function(){
		  $("#slt").show();
	})
  })
  	function confirmSub(){
		var i = checkForm(document.getElementById('frm_config_reward'));
		var min_day = parseInt($("#min_day").val())+0;
		var max_day = parseInt($("#max_day").val())+0;
		var deposit_all = parseInt($("#deposit").val())+0;
		var deposit_rate = parseInt($("#deposit_rate").val())+0;
		if(i){
				if(min_day>max_day){
				art.dialog.alert("竞标截止最大时间限制不能小于竞标截止最小时间限制");
				return false;
			    }else if(deposit_rate>deposit_all){
				art.dialog.alert("诚意金扣除不能大于诚意金总金额");
				return false;
			    }else{
					$("#frm_config_reward").submit();
				}
		}else{
			return false;
		}
	}
</script>
<!--{template ADMIN_DIRECTORY/tpl/admin_footer}-->